package com.imooc.distributedemo.init;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Component
public class CommonInit {

    @Value("${ethereum.rpc.url:1}")
    private String ethereumRpcUrl;

    @Value("${spring.redis.host:127.0.0.11}")
    private String redisHost;

    @Value("${spring.redis.port:3306}")
    private int redisPort;


    @PostConstruct
    public void init() {

        System.out.println("CommonInit init");
        System.out.println(redisHost + ":" + redisPort);
        System.out.println("CommonInit init");
    }
}
